<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改施工资料')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-impl-edit" th:object="${proImpl}">
            <input name="imId" th:field="*{imId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">资料类型：</label>
                <div class="col-sm-8">
                    <select id="imType" name="imType" th:with="type=${@dict.getType('sys_impl_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">资料名称：</label>
                <div class="col-sm-8">
                    <input id="imName" name="imName" th:field="*{imName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">上传资料：</label>
                <div class="col-sm-8">
                    <input id="filePath" name="imData" th:field="*{imData}" class="form-control" type="file" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input id="imRemark" name="imRemark" th:field="*{imRemark}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">项目信息：</label>
                <div class="col-sm-8">
                    <input name="imPro" th:field="*{imPro}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">审批意见：</label>
                <div class="col-sm-8">
                    <input id="imOpinion" name="imOpinion" th:field="*{imOpinion}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "ruoyi/impl";
        $("#form-impl-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-impl-edit').serialize());
            }
        }

        $("input[name='imTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>